/**
 * @description  行业收益贡献差(归因分析)
 * @author shenhong
 */
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { ThreeHeaderC, XYHorizontalChartsC } from '../../../../comps';
import style from '../index.less';

class DiffContribution extends PureComponent {
  constructor() {
    super();
    this.state = {};
  }

  showCharts = () => {
    const {
      attributionAnalysisM: { diffData },
    } = this.props;
    const yAxis = diffData.yAxis;
    const series = diffData.series2;
    return (
      <div style={{ height: '480px' }}>
        <XYHorizontalChartsC
          yAxis={yAxis}
          series={series}
          height={480}
          type='debtAndProfit'
          // title='标题'
        />
      </div>
    );
  };

  render() {
    return (
      <div className={style.back_charts}>
        <ThreeHeaderC title='行业收益贡献差' />
        <div style={{ height: '480px' }} className='echarts'>
          {this.showCharts()}
        </div>
      </div>
    );
  }
}
export default connect(({ attributionAnalysisM }) => ({
  attributionAnalysisM,
}))(DiffContribution);
